(library (logic-utils)
  (export any all)
  (import
    (except (rnrs base) let-values)
    (only (guile) lambda* λ)
    (srfi srfi-1)))


(define any
  (lambda* (. args)
    (reduce (λ (arg acc)
              (or acc arg))
            #f
            args)))


(define all
  (lambda* (. args)
    (reduce (λ (arg acc)
              (and acc arg))
            #t
            args)))
